const express = require('express')
const fs = require('fs')

var app = express()

app.get('/listUser',(req,res) => {
    fs.readFile(__dirname + '/users.json','utf8',(err,data) => {
        if(err){
            console.error(err)
        }else{
            console.table(data)
            res.end(data)
            console.log("listUser successfully!")  
        }
    } )
})

app.listen(8081,() =>{
    console.log('http://localhost:8081/listUser')
});
